﻿#pragma once
#include "yzrutil.h"
#include "File.h"
#include "InputStream.h"
#include <cstdio>
#include <string>

namespace yzrilyzr_io{
	ECLASS(FileInputStream, public InputStream){
	private:
	int8_t oneByte;
	FILE * fp=nullptr;
	public:
	FileInputStream(const char * filePath);
	FileInputStream(const yzrilyzr_lang::String & filePath);
	FileInputStream(const File & file);
	~FileInputStream();
	int32_t read() override;
	using InputStream::read;
	u_index read(yzrilyzr_array::ByteArray & buf, u_index off, u_index len) override;
	void close() override;
	};
}